<script>
let add = function(){
    let num = 0
    return function(){
        num++
        return num
    }
}
var addNum = add()

function otheradd(){
    num --
    return num
}
console.log(addNum());
console.log(addNum());
console.log(addNum());
console.log(addNum());
console.log(addNum());
console.log(otheradd());

</script>